﻿using System;
using JinianNet.JNCms.Models;
using System.Collections.Generic;

namespace JinianNet.JNCms.Data
{
    public interface ICategory
    {
        int Insert(Category model);
        int Update(Category model);
        int Delete(int id);
        //int UpdateCount(string item, int number);
        List<Models.Category> GetList(int parent, bool hasChild);
        Category GetItem(string item);
        Category GetItem(int id);
    }
    public partial class DataAccess
    {
        public static ICategory CreateCategory()
        {
            return (ICategory)CreateObject(".Category");
        }
    }
}
